/**
 * Generate time : 2011-06-01 3:10:07
 * Version : 1.0.1.V20070717
 */
package com.baosight.sczx.zm.cs.domain;

import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.ep.DaoEPBase;
import java.util.HashMap;
import java.util.Map;
import com.baosight.iplat4j.util.StringUtils;

/**
 * ZMCSProductionUnits table comment : 生产单元
 */
public class ZMCSProductionUnits extends DaoEPBase {

	private String fdKeyId = " "; /* FD_KEY_ID */
	private String fdProductionSystemId = " "; /* 生产系统ID */
	private String fdNo = " "; /* 生产单元编号 */
	private String fdName = " "; /* 生产单元名称 */
	private String fdStatus = " "; /* 状态 */
	private String fdEquipmentId = " "; /* 设备卡片ID */
	private String fdDeviceLifetime = " "; /* 使用寿命(H) */
	private String fdOverhaulPeriod = " "; /* 检修周期(H) */
	private String fdAvrRecoverytim = " "; /* 平均恢复时间指标(M) */
	private String fdAvrNormaltime = " "; /* 平均无故障时间指标(M) */
	private String fdTheoryPeriod = " "; /* 理论加工周期(M) */
	private String fdTheoryCapacity = " "; /* 理论处理量 */
	private String fdUnitId = " "; /* 处理量单位 */
	private String fdOverhaulTime = " "; /* 上次检修时间 */
	private String fdRemarks = " "; /* 备注 */

	/**
	 * initialize the metadata
	 */
	public void initMetaData() {
		EiColumn eiColumn;

		eiColumn = new EiColumn("fdKeyId");
		eiColumn.setPrimaryKey(true);
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("FD_KEY_ID");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdProductionSystemId");
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("生产系统ID");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdNo");
		eiColumn.setFieldLength(10);
		eiColumn.setDescName("生产单元编号");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdName");
		eiColumn.setFieldLength(30);
		eiColumn.setDescName("生产单元名称");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdStatus");
		eiColumn.setFieldLength(4);
		eiColumn.setDescName("状态");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdEquipmentId");
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("设备卡片ID");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdDeviceLifetime");
		eiColumn.setFieldLength(30);
		eiColumn.setDescName("使用寿命(H)");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdOverhaulPeriod");
		eiColumn.setFieldLength(30);
		eiColumn.setDescName("检修周期(H)");
		eiMetadata.addMeta(eiColumn);
		
		eiColumn = new EiColumn("fdAvrRecoverytim");
		eiColumn.setFieldLength(30);
		eiColumn.setDescName("平均恢复时间指标(M)");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdAvrNormaltime");
		eiColumn.setFieldLength(30);
		eiColumn.setDescName("平均无故障时间指标(M)");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdTheoryPeriod");
		eiColumn.setFieldLength(30);
		eiColumn.setDescName("理论加工周期(M)");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdTheoryCapacity");
		eiColumn.setFieldLength(30);
		eiColumn.setDescName("理论处理量");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdUnitId");
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("处理量单位");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdOverhaulTime");
		eiColumn.setFieldLength(30);
		eiColumn.setDescName("上次检修时间");
		eiMetadata.addMeta(eiColumn);
		
		eiColumn = new EiColumn("fdRemarks");
		eiColumn.setFieldLength(500);
		eiColumn.setDescName("备注");
		eiMetadata.addMeta(eiColumn);

	}

	/**
	 * the constructor
	 */
	public ZMCSProductionUnits() {
		initMetaData();
	}

	/**
	 * get the fdKeyId - FD_KEY_ID
	 * 
	 * @return the fdKeyId
	 */
	public String getFdKeyId() {
		return this.fdKeyId;
	}

	/**
	 * set the fdKeyId - FD_KEY_ID
	 */
	public void setFdKeyId(String fdKeyId) {
		this.fdKeyId = fdKeyId;
	}

	/**
	 * get the fdProductionSystemId - 生产系统ID
	 * 
	 * @return the fdProductionSystemId
	 */
	public String getFdProductionSystemId() {
		return this.fdProductionSystemId;
	}

	/**
	 * set the fdProductionSystemId - 生产系统ID
	 */
	public void setFdProductionSystemId(String fdProductionSystemId) {
		this.fdProductionSystemId = fdProductionSystemId;
	}

	/**
	 * get the fdNo - 生产单元编号
	 * 
	 * @return the fdNo
	 */
	public String getFdNo() {
		return this.fdNo;
	}

	/**
	 * set the fdNo - 生产单元编号
	 */
	public void setFdNo(String fdNo) {
		this.fdNo = fdNo;
	}

	/**
	 * get the fdName - 生产单元名称
	 * 
	 * @return the fdName
	 */
	public String getFdName() {
		return this.fdName;
	}

	/**
	 * set the fdName - 生产单元名称
	 */
	public void setFdName(String fdName) {
		this.fdName = fdName;
	}

	/**
	 * get the fdStatus - 状态
	 * 
	 * @return the fdStatus
	 */
	public String getFdStatus() {
		return this.fdStatus;
	}

	/**
	 * set the fdStatus - 状态
	 */
	public void setFdStatus(String fdStatus) {
		this.fdStatus = fdStatus;
	}

	/**
	 * get the fdEquipmentId - 设备卡片ID
	 * 
	 * @return the fdEquipmentId
	 */
	public String getFdEquipmentId() {
		return this.fdEquipmentId;
	}

	/**
	 * set the fdEquipmentId - 设备卡片ID
	 */
	public void setFdEquipmentId(String fdEquipmentId) {
		this.fdEquipmentId = fdEquipmentId;
	}

	/**
	 * get the fdDeviceLifetime - 使用寿命(H)
	 * 
	 * @return the fdDeviceLifetime
	 */
	public String getFdDeviceLifetime() {
		return this.fdDeviceLifetime;
	}

	/**
	 * set the fdDeviceLifetime - 使用寿命(H)
	 */
	public void setFdDeviceLifetime(String fdDeviceLifetime) {
		this.fdDeviceLifetime = fdDeviceLifetime;
	}

	/**
	 * get the fdOverhaulPeriod - 检修周期(H)
	 * 
	 * @return the fdOverhaulPeriod
	 */
	public String getFdOverhaulPeriod() {
		return this.fdOverhaulPeriod;
	}

	/**
	 * set the fdOverhaulPeriod - 检修周期(H)
	 */
	public void setFdOverhaulPeriod(String fdOverhaulPeriod) {
		this.fdOverhaulPeriod = fdOverhaulPeriod;
	}
	
	/**
	 * get the fdAvrRecoverytim - 平均恢复时间指标(M)
	 * 
	 * @return the fdAvrRecoverytim
	 */
	public String getFdAvrRecoverytim() {
		return this.fdAvrRecoverytim;
	}

	/**
	 * set the fdAvrRecoverytim - 平均恢复时间指标(M)
	 */
	public void setFdAvrRecoverytim(String fdAvrRecoverytim) {
		this.fdAvrRecoverytim = fdAvrRecoverytim;
	}

	/**
	 * get the fdAvrNormaltime - 平均无故障时间指标(M)
	 * 
	 * @return the fdAvrNormaltime
	 */
	public String getFdAvrNormaltime() {
		return this.fdAvrNormaltime;
	}

	/**
	 * set the fdAvrNormaltime - 平均无故障时间指标(M)
	 */
	public void setFdAvrNormaltime(String fdAvrNormaltime) {
		this.fdAvrNormaltime = fdAvrNormaltime;
	}

	/**
	 * get the fdTheoryPeriod - 理论加工周期(M)
	 * 
	 * @return the fdTheoryPeriod
	 */
	public String getFdTheoryPeriod() {
		return this.fdTheoryPeriod;
	}

	/**
	 * set the fdTheoryPeriod - 理论加工周期(M)
	 */
	public void setFdTheoryPeriod(String fdTheoryPeriod) {
		this.fdTheoryPeriod = fdTheoryPeriod;
	}

	/**
	 * get the fdTheoryCapacity - 理论处理量
	 * 
	 * @return the fdTheoryCapacity
	 */
	public String getFdTheoryCapacity() {
		return this.fdTheoryCapacity;
	}

	/**
	 * set the fdTheoryCapacity - 理论处理量
	 */
	public void setFdTheoryCapacity(String fdTheoryCapacity) {
		this.fdTheoryCapacity = fdTheoryCapacity;
	}

	/**
	 * get the fdUnitId - 处理量单位
	 * 
	 * @return the fdUnitId
	 */
	public String getFdUnitId() {
		return this.fdUnitId;
	}

	/**
	 * set the fdUnitId - 处理量单位
	 */
	public void setFdUnitId(String fdUnitId) {
		this.fdUnitId = fdUnitId;
	}

	/**
	 * get the fdOverhaulTime - 上次检修时间
	 * 
	 * @return the fdOverhaulTime
	 */
	public String getFdOverhaulTime() {
		return this.fdOverhaulTime;
	}

	/**
	 * set the fdOverhaulTime - 上次检修时间
	 */
	public void setFdOverhaulTime(String fdOverhaulTime) {
		this.fdOverhaulTime = fdOverhaulTime;
	}
	
	/**
	 * get the fdRemarks - 备注
	 * 
	 * @return the fdRemarks
	 */
	public String getFdRemarks() {
		return this.fdRemarks;
	}

	/**
	 * set the fdRemarks - 备注
	 */
	public void setFdRemarks(String fdRemarks) {
		this.fdRemarks = fdRemarks;
	}

	/**
	 * get the value from Map
	 */
	@SuppressWarnings("rawtypes")
	public void fromMap(Map map) {

		setFdKeyId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdKeyId")), fdKeyId));
		setFdProductionSystemId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdProductionSystemId")), fdProductionSystemId));
		setFdNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdNo")), fdNo));
		setFdName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdName")), fdName));
		setFdStatus(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdStatus")), fdStatus));
		setFdEquipmentId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdEquipmentId")), fdEquipmentId));
		setFdDeviceLifetime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdDeviceLifetime")), fdDeviceLifetime));
		setFdOverhaulPeriod(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdOverhaulPeriod")), fdOverhaulPeriod));
		setFdAvrRecoverytim(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdAvrRecoverytim")), fdAvrRecoverytim));
		setFdAvrNormaltime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdAvrNormaltime")), fdAvrNormaltime));
		setFdTheoryPeriod(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdTheoryPeriod")), fdTheoryPeriod));
		setFdTheoryCapacity(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdTheoryCapacity")), fdTheoryCapacity));
		setFdUnitId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdUnitId")), fdUnitId));
		setFdOverhaulTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdOverhaulTime")), fdOverhaulTime));
		setFdRemarks(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdRemarks")), fdRemarks));
	}

	/**
	 * set the value to Map
	 */
	@SuppressWarnings({ "rawtypes", "unchecked" })
	public Map toMap() {

		Map map = new HashMap();
		map.put("fdKeyId", StringUtils.toString(fdKeyId, eiMetadata.getMeta("fdKeyId")));
		map.put("fdProductionSystemId", StringUtils.toString(fdProductionSystemId, eiMetadata.getMeta("fdProductionSystemId")));
		map.put("fdNo", StringUtils.toString(fdNo, eiMetadata.getMeta("fdNo")));
		map.put("fdName", StringUtils.toString(fdName, eiMetadata.getMeta("fdName")));
		map.put("fdStatus", StringUtils.toString(fdStatus, eiMetadata.getMeta("fdStatus")));
		map.put("fdEquipmentId", StringUtils.toString(fdEquipmentId, eiMetadata.getMeta("fdEquipmentId")));
		map.put("fdDeviceLifetime", StringUtils.toString(fdDeviceLifetime, eiMetadata.getMeta("fdDeviceLifetime")));
		map.put("fdOverhaulPeriod", StringUtils.toString(fdOverhaulPeriod, eiMetadata.getMeta("fdOverhaulPeriod")));
		map.put("fdAvrRecoverytim", StringUtils.toString(fdAvrRecoverytim, eiMetadata.getMeta("fdAvrRecoverytim")));
		map.put("fdAvrNormaltime", StringUtils.toString(fdAvrNormaltime, eiMetadata.getMeta("fdAvrNormaltime")));
		map.put("fdTheoryPeriod", StringUtils.toString(fdTheoryPeriod, eiMetadata.getMeta("fdTheoryPeriod")));
		map.put("fdTheoryCapacity", StringUtils.toString(fdTheoryCapacity, eiMetadata.getMeta("fdTheoryCapacity")));
		map.put("fdUnitId", StringUtils.toString(fdUnitId, eiMetadata.getMeta("fdUnitId")));
		map.put("fdOverhaulTime", StringUtils.toString(fdOverhaulTime, eiMetadata.getMeta("fdOverhaulTime")));
		map.put("fdRemarks", StringUtils.toString(fdRemarks, eiMetadata.getMeta("fdRemarks")));

		return map;

	}
}